package com.springboot.astra.service.serviceImpl;

import com.springboot.astra.bean.Orderitem;
import com.springboot.astra.mapper.OrderitemMapper;
import com.springboot.astra.service.OrderitemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class OrderitemServiceImpl implements OrderitemService {

    @Autowired
    OrderitemMapper orderitemMapper;

    @Override
    public Orderitem getOneById(Integer id) {
        return orderitemMapper.getOneById(id);
    }

    @Override
    public List<Orderitem> getAllByOrderId(Integer id) {
        return orderitemMapper.getAllByOrderId(id);
    }

    @Override
    public void insertOrderitem(Orderitem orderitem) {
        orderitemMapper.insertOrderitem(orderitem);
    }

    @Override
    public void updateOneById(Orderitem orderitem) {
        orderitemMapper.updateOneById(orderitem);
    }

    @Override
    public void updateCdk(Orderitem orderitem) {
        orderitemMapper.updateCdk(orderitem);
    }

    @Override
    public void deleteOneById(Integer id) {
        orderitemMapper.deleteOneById(id);
    }
}
